<!DOCTYPE html>
<html>
	<head>

    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <meta name="description" content="">
    <meta name="author" content="">

    <title>SB Admin - Bootstrap Admin Template</title>

    <!-- Bootstrap Core CSS -->
    <link href="__PUBLIC__/home/css/bootstrap.min.css" rel="stylesheet">

    <!-- Custom Fonts -->
    <!--<link href="_PUBLIC__/font/css/font-awesome.min.css" rel="stylesheet" type="text/css">-->

    <!-- HTML5 Shim and Respond.js IE8 support of HTML5 elements and media queries -->
    <!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
    <!--[if lt IE 9]>
        <script src="https://oss.maxcdn.com/libs/html5shiv/3.7.0/html5shiv.js"></script>
        <script src="https://oss.maxcdn.com/libs/respond.js/1.4.2/respond.min.js"></script>
    <![endif]-->
	
</head>
	<body>
		<div class="container-fluid">
        <!-- Page Heading -->
	        <div class="row">
				<div class="col-md-12">
					<ol class="breadcrumb">
						<li class="active">
							<i class="fa fa-fw fa-edit"></i>
							产品管理
						</li>
					</ol>
				</div>
			</div>
			<div class="row">
				<ul class="nav nav-tabs" role="tablist">
				    <li role="presentation" class="active"><a href="#message" aria-controls="home" role="tab" data-toggle="tab">基本信息</a></li>
			 	</ul>
			 	<div class="tab-content col-xs-12">
					<div role="tabpanel" class="tab-pane active" id="message">
						<div class="row">
							<div class="col-sm-10">
								<form id="zyn-form-add" class="form-horizontal">
									<div class="form-group" style="display: none;">
										<label for="lc-input-drive_id" class="control-label col-sm-2">命令id</label>
										<div class="col-sm-3">
											<input id="lc-input-drive_id" class="form-control" type="text" name="drive_id" value="{$drive.drive_id}"/>
										</div>
										<div class="col-sm-3">
											<p class="lc-p-validate-result p-no-margin" attr-validate = "drive_id">*命令id</p>
										</div>
									</div>
									<div class="form-group">
										<label for="lc-input-drive_name" class="control-label col-sm-2">命令名</label>
										<div class="col-sm-3">
											<input id="lc-input-drive_name" class="form-control" type="text" name="drive_name" value="{$drive.drive_name}"/>
										</div>
										<div class="col-sm-3">
											<p class="lc-p-validate-result p-no-margin" attr-validate = "drive_name">*命令名</p>
										</div>
									</div>
								</form>
							</div>	
						</div>
					</div>
 				</div>
 				<div class="col-xs-10 col-xs-offset-2">
 					<button class="btn btn-primary" id="xx-btn-save">提交保存</button>
 					<button class="btn btn-primary" id="xx-btn-return">返回上一页</button>
 				</div>
			</div>
		</div>
		
	</body>
	<script src="__PUBLIC__/home/js/jquery.min.js"></script>

    <!-- Bootstrap Core JavaScript -->
    <script src="__PUBLIC__/home/js/bootstrap.min.js"></script>
	<script>
    $(function() {
    	
    });
    $("#xx-btn-return").click(function(){
    	location.href = "__MODULE__/Admin/index";
    });
    $("#xx-btn-save").click(function(){
		$.ajax({
			type:"post",
			url:"{:U('Drive/reviseDriveInfo')}",
			data:{
				'drive_id' : $("#lc-input-drive_id").val(),
				'drive_name' : $("#lc-input-drive_name").val(),
			},
			dataType:'json',
			success:function(result){
				//链接服务器其成功
				if(result.status == 1){
					//成功
					return location.href = "{:U('Drive/index')}";
				}else{
					alert(result.msg);
				}
				
			},
			
		});
    });
    </script>
</html>
